var newsDAO = require('../models/newsDAO')
var newscontroller = {
    selNews:function(req,res){
        newsDAO.selNews(function(err,results){
            if(err){
                console.log(err)
                res.json({code:500,msg:'数据库出错，查询失败'})
            }else{
                res.json({code:200,data:results,msg:'查询成功'})
            }
        })
    }
}
module.exports = newscontroller